package com.qiantu.phone.widget.setting;

import android.content.Context;
import android.util.AttributeSet;

import com.hjq.base.DensityUtils;
import com.hjq.shape.layout.ShapeLinearLayout;
import com.qiantu.phone.R;

public class SettingAreaView extends ShapeLinearLayout {
    public SettingAreaView(Context context) {
        this(context, null);
    }

    public SettingAreaView(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public SettingAreaView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr, R.style.shadow_layout_style);
        LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
        layoutParams.leftMargin = getResources().getDimensionPixelSize(R.dimen.dp_12);
        layoutParams.rightMargin = getResources().getDimensionPixelSize(R.dimen.dp_12);
        layoutParams.topMargin = getResources().getDimensionPixelSize(R.dimen.dp_8);
        setLayoutParams(layoutParams);
        setOrientation(VERTICAL);
        int paddingSize = DensityUtils.dip2px(context, 4);
        setPadding(paddingSize, paddingSize, paddingSize, paddingSize);
    }
}
